# Packager: Justin Davis <jrcd83@gmail.com>
# $Id: PKGBUILD 86657 2013-03-20 23:12:00Z eric $

pkgname=perl-file-pushd
pkgver=1.004
pkgrel=1
pkgdesc="change directory temporarily for a limited scope"
arch=(any)
license=(Apache)
options=(!emptydirs)
depends=('perl')
makedepends=('perl-extutils-makemaker>=6.30')
url="https://metacpan.org/release/File-pushd"
source=("http://search.cpan.org/CPAN/authors/id/D/DA/DAGOLDEN/File-pushd-${pkgver}.tar.gz")
md5sums=('2c10f984845444b58a9f999dbf30f8f4')

build() {
  ( export PERL_MM_USE_DEFAULT=1 PERL5LIB=""                 \
      PERL_AUTOINSTALL=--skipdeps                            \
      PERL_MM_OPT="INSTALLDIRS=vendor"     \
      PERL_MB_OPT="--installdirs vendor" \
      MODULEBUILDRC=/dev/null

    cd File-pushd-${pkgver}
    /usr/bin/perl Makefile.PL
    make
  )
}

check() {
  ( export PERL_MM_USE_DEFAULT=1 PERL5LIB=""
    cd File-pushd-${pkgver}
    make test
  )
}

package() {
    cd File-pushd-${pkgver}
    make DESTDIR="$pkgdir" install
}

# Local Variables:
# mode: shell-script
# sh-basic-offset: 2
# End:
# vim:set ts=2 sw=2 et:
